namespace SimpleWebServices
{
    using System;

    public sealed class BaseClassTest<T> : ITestExpectation
    {
        public Type Is
        {
            get;
            set;
        }

        public bool Check()
        {
            if (!typeof(T).IsSubclassOf(this.Is))
            {
                throw new TestException(string.Concat(typeof(T).Name, " is not derived from ", this.Is.Name, "."));
            }

            return true;
        }
    }
}